#include "RelationalExpr.h"
#include "ShiftExpr.h"


RelationalExpr::~RelationalExpr(void)
{
	switch(m_iType)
	{
	case single_expr:
		delete m_pSingleExpr;
		break;
	case small_expr:
	case small_equal_expr:
	case large_expr:
	case large_equal_expr:
		delete m_pRlaExpr;
		delete m_pShiftExpr;
		break;
	default:
		std::cout<<"RelationalExpr::~RelationalExpr(), Unknown type!\n"<<std::endl;
		exit(0);
	}
}

void RelationalExpr::codeGen()
{
	COUT
	switch(m_iType)
	{
	case single_expr:
		m_pSingleExpr->codeGen();
		break;
	case small_expr:
	case small_equal_expr:
	case large_expr:
	case large_equal_expr:
		m_pRlaExpr->codeGen();
		m_pShiftExpr->codeGen();
		break;
	default:
		std::cout<<"RelationalExpr::codeGen(), Unknown type!\n"<<std::endl;
		exit(1);
	}
}